﻿@model EventSys.BussinesEntities.Carrera

@{
    var ajaxoption = new AjaxOptions() {
        //Url = Url.Action("_Create"),
        OnSuccess = "OnSuccessCreate"
    };
 }


<script type="text/javascript">
    $(document).ready(function () {
        $("#nombr").keydown(function (e) {
            // Permite: backspace, delete, tab, escape, enter and .
            if ($.inArray(e.keyCode, [46, 8, 9, 27, 13, 110, 190]) !== -1 ||
                // Permite: Ctrl+A -----> para seleccionar todo el texto de la casilla
                (e.keyCode == 65 && e.ctrlKey === true) ||
                // Perimite: home, end, left, right
                (e.keyCode >= 35 && e.keyCode <= 39)) {
                    // deja que suceda todo, no hacer nada
                    return;
                }
            // Se asegura de que se trata de un número y detiene la pulsación de tecla
            if ((e.shiftKey || (e.keyCode < 48 || e.keyCode > 57)) && (e.keyCode < 96 || e.keyCode > 105)) {
                e.preventDefault();
            }
        });
    });

</script>



<div id="dialogAdd" title="Registar">
@using (Ajax.BeginForm(null, null, ajaxoption, new {id = "frmCreate",name="frmCreate" }))
{
    @Html.ValidationSummary(true)

@*@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

    *@<fieldset>
        <legend>Carrera</legend>

@*        <div class="editor-label">
            @Html.LabelFor(model => model.idCarrera)
        </div>*@
        <div class="editor-field">
            @Html.HiddenFor(model => model.idCarrera)
            @Html.ValidationMessageFor(model => model.idCarrera)
        </div>

        <div class="editor-label">
            Carrera
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.Carrera1, new { id="nombre"})
            @Html.ValidationMessageFor(model => model.Carrera1)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.idFacultad)
        </div>
        <div class="editor-field">
            @Html.DropDownList("idFacultad") 
            @Html.ValidationMessageFor(model => model.idFacultad)

@*            @Ajax.ActionLink("Ingrese Facultad", "_Create","Facultad", 
            new AjaxOptions() { UpdateTargetId="showCrear" })*@
        </div>

@*        <p>
            <input type="submit" value="Create" class="k-button"/>
        </p>*@
    </fieldset>
}
<br /> <br />
<div id="showCrear" title="facultadddd" style="float:left;"></div> 

@*<div>
    @Html.ActionLink("Back to List", "Index")
</div>*@

    </div>


